package com.example.shop.common.service.impl;

import com.example.shop.common.service.BriefInfoService;
import com.example.shop.merchant.dao.MerchantBriefInfoDao;
import com.example.shop.merchant.dto.MerchantBriefInfo;
import com.example.shop.user.dao.UserBriefInfoDao;
import com.example.shop.user.dto.UserBriefInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BriefInfoServiceImpl implements BriefInfoService {

    @Autowired
    private MerchantBriefInfoDao merchantBriefInfoDao;
    @Autowired
    private UserBriefInfoDao userBriefInfoDao;

    @Override
    public UserBriefInfo getUserAvatar(long userId) {
        return userBriefInfoDao.selectById(userId);
    }

    @Override
    public MerchantBriefInfo getMerchantAvatar(long merchantId) {
        return merchantBriefInfoDao.selectById(merchantId);
    }
}
